<template>
    <div>
        <h1>Message页面</h1>
        <div>{{count}}</div>
        <!--<div>{{name}}</div>-->
    </div>
</template>
<script>
    import {mapState,mapGetters} from 'vuex'
    export default{
        name:'message',
        data:function(){
            return {

            }
        },
        // 从Store中获取的state只能作为组件的计算属性存在
        // mapState(['count'])会从store的state中找到同名的属性count
        // mapGetters([''])会从store的getters中找到同名的属性
        computed:mapState(['count'])
        //computed: mapGetters(['name'])
    }
</script>
<style scoped>

</style>
